//
//  FR_HomeTopFunctionView.m
//  FaceRecognition
//
//  Created by Sylar on 2017/7/7.
//  Copyright © 2017年 Sylar. All rights reserved.
//

#import "FR_HomeTopFunctionView.h"

@implementation FR_HomeTopFunctionView

-(instancetype)initWithFrame:(CGRect)frame{
    
    if (self = [super initWithFrame:frame]) {
        
        _bgView = [[UIView alloc]initWithFrame:CGRectMake(0, 20, 42, 42)];
        _bgView.centerX = self.width/2.0;
        _bgView.layer.cornerRadius = 8.0;
        _bgView.layer.borderColor = [colorFromHex(@"CCCCCC") CGColor];
        _bgView.layer.borderWidth = 0.5;
        
        [self addSubview:_bgView];
        
        _countLabel = [[UILabel alloc]initWithFrame:CGRectMake(1, 9, 40, 24)];
        [_countLabel setFont:[UIFont systemFontOfSize:24]];
        [_countLabel setTextColor:colorFromHex(@"3b3b3b")];
        [_countLabel setTextAlignment:NSTextAlignmentCenter];
        [_countLabel setText:@"0"];
        
        [_bgView addSubview:_countLabel];
        
        _titleLabel = [[UILabel alloc]initWithFrame:CGRectMake(0, _bgView.bottom+13, self.width, 14)];
        [_titleLabel setFont:[UIFont systemFontOfSize:14]];
        [_titleLabel setTextAlignment:NSTextAlignmentCenter];
        [_titleLabel setTextColor:colorFromHex(@"979797")];
        
        [self addSubview:_titleLabel];
        

    }
    
    return self;
}


@end
